<script>
	import apiRequest from "@/api/request.js";
	export default {
		
		onLaunch: function() {
			let token = this.$store.state.userInfo.token;
			//登录直接跳到主页》》》微信调试记得注释，不然你自己试试有bug(点什么都没反应)
			// if (token) {
			// 	this.$util.redirectTo({
			// 		url: '/pages/tab2/index'
			// 	})
			// }
			
		
		},
		onError(err, vm, info) {
			// 页面级异常处理
			console.log('app.vue>>1')
			var data = {
				date: new Date(),
				err: err,
				page: vm,
				info: info
			};
			for (var item in data) {
				if (typeof data[item] == "object") {
					data[item] = JSON.stringify(data[item]);
					//console.log(item+">>》》》》》》>"+JSON.stringify(data[item]))
				}
			}
			
			this.$store.commit('setErroeList', data);
			let uuid = ''
			// #ifdef APP-PLUS
			uuid = plus.device.uuid;
			// #endif
			
			var message = '',
				title = ''
			if (!err.message) {
				title = ''
				message = err;
			} else {
				title = err.message
				message = err.stack;
			}
			var platform = uni.getSystemInfoSync().platform;
			
			
			var errorPages1 = '',
				errorPage = '';
			if (message.indexOf(' at ') >= 0) {
				errorPages1 = message.split(' at ')[1];
				errorPage = errorPages1.split('page')[1];
			} else {
				errorPage = '该终端无法获取报错文件名.'
			
			}
			
			
		},
		
		onShow: function() {
			// 获取服务ip
			//console.log('app onShow')
			var request = this.$store.getters.getApiRequest;
			if (request.IPhttp) {
				if (request.IPhttp != apiRequest.IPhttp) {
					apiRequest.IPhttp = request.IPhttp;
				} 
			} else {
				this.$store.commit('setApiRequest', apiRequest);
			}
		},
		onHide: function() {}
	}
</script>
<style>
	@import "common/qiun.css";
</style>
<style lang="scss">
	/*每个页面公共css */
	// 换肤
	@import "@/common/mixin.scss";
	@import "@/common/theme.scss";
	// 换肤选择样式ui
	@import "colorui/main.css";
	@import "colorui/icon.css";
	
	@import "@/common/flex.css";
	@import "@/common/uni.scss";
</style>
<!-- 年月周控件 -->
<style lang="scss">
	.my_page {
		width: 100%;
	}

	.dates-box {

		//border-bottom: 1upx solid #d7d7d7;
		.z {
			width: 300upx;
		}

		.y {
			width: 95upx;
		}

		.m {
			width: 165upx;
		}

		.mz {
			width: 300upx;
		}

		.d {
			width: 160upx;
		}

		.iconarrow-left {
			padding: 20upx;
		}

		.iconarrow-right {
			padding: 20upx;
		}

		.uni-margin-wrap {
			margin: 0 20upx;

			.swiper {
				height: 50upx;
				line-height: 50upx;
				font-size: 26upx;
				width: 100%;
				overflow: hidden;
				display: block;
				min-width: 60upx;

				swiper-item {}
			}
		}

		.dates {
			width: 100%;
		}

		.date {
			padding: 0 15upx;
			height: 60upx;
			border: 1upx solid #d7d7d7;
			border-radius: 100upx;

			font-size: 30upx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #717171;
		}

		.selected {
			background: #128a80;
			font-size: 30upx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #fefefd;
		}
	}

	.datePopup-box {
		background-color: rgba(255, 255, 255, 1);

		.btn-Block {
			width: 100%;
			background-color: rgba(255, 255, 255, 1);
			padding: 25upx;
			height: 230upx;

			.btn-left {
				width: 250upx;
				height: 80upx;
				border-radius: 10upx;
				color: rgba(0, 189, 0, 0.8);
				background-color: rgba(170, 255, 255, 1);
				background-image: linear-gradient(to top right, rgba(241, 240, 240, 1), rgba(238, 238, 238, 1));
				margin-right: 30upx;
			}

			.btn-right {
				width: 250upx;
				height: 80upx;
				border-radius: 10upx;
				color: rgba(255, 255, 250, 1);
				background-color: rgba(195, 195, 0, 1);
				background-image: linear-gradient(to top right, rgba(0, 180, 0, 0.8), rgba(0, 188, 0, 0.8));
			}
		}

		.picker-view {
			border-radius: 20upx 20upx 0 0;
			background-color: rgba(255, 254, 253, 1);
		}

		picker-view {
			width: 100%;
			height: 600upx;
		}
	}
</style>
<!-- 门店下拉组件  -->
<style lang="scss">
	.select {
		background-color: #fcfdfd;
		width: 100%;
		height: 70upx;
		padding: 0 30upx;
		margin: 20upx 0;
		border-radius: 100px;
		border: 1px solid #e6e4e4;

		// xfl-select {
		// 	width: 100%;
		// }
	}

	.addressPopup-box {
		background-color: rgba(250, 254, 255, 1.0);

		.btn-Block {
			border: 0px;
			width: 100%;
			background-color: rgba(250, 255, 255, 1);
			padding: 25upx;
			height: 230upx;

			.btn-left {
				width: 250upx;
				height: 80upx;
				border-radius: 10upx;
				color: rgba(0, 189, 0, 0.8);
				background-color: rgba(170, 255, 255, 1.0);
				background-image: linear-gradient(to top right, rgba(241, 240, 240, 1.0), rgba(238, 238, 238, 1.0));
				margin-right: 30upx;
			}

			.btn-right {
				width: 250upx;
				height: 80upx;
				border-radius: 10upx;
				color: rgba(255, 255, 250, 1.0);
				background-color: rgba(195, 195, 0, 1);
				background-image: linear-gradient(to top right, rgba(0, 180, 0, 0.8), rgba(0, 188, 0, 0.8));
			}
		}

		.picker-view {
			border: 0px;
			border-radius: 20upx 20upx 0 0;
			background-color: rgba(255, 254, 253, 1.0);

		}

		picker-view {
			border: 0px;
			width: 100%;
			height: 600upx;
		}
	}
</style>
<!-- 表格 -->
<style>
	.loader-one {
		width: 50rpx;
		height: 50rpx;
		position: relative;
		-webkit-animation: loading-one 1s infinite linear;
		animation: loading-one 1s infinite linear;
	}

	.loader-one,
	.loader-one:after {
		border-radius: 50%;
	}

	@-webkit-keyframes loading-one {
		0% {
			-webkit-transform: rotate(0deg);
			transform: rotate(0deg);
		}

		100% {
			-webkit-transform: rotate(360deg);
			transform: rotate(360deg);
		}
	}

	@keyframes loading-one {
		0% {
			-webkit-transform: rotate(0deg);
			transform: rotate(0deg);
		}

		100% {
			-webkit-transform: rotate(360deg);
			transform: rotate(360deg);
		}
	}


	.wyb-table-box {
		border: 1px solid rgba(227, 227, 227, 0.8);
		border-radius: 10upx;
	}

	.ios-header-bug {
		height: 0;
		width: 1px;
		opacity: 0;
	}

	.wyb-table-scroll-view {
		border-radius: 10upx;
		overflow: scroll;
		-webkit-overflow-scrolling: touch;

	}

	.wyb-table-scroll-view::-webkit-scrollbar {
		display: none;
		/* #ifdef MP-WEIXIN */
		width: 0;
		height: 0;
		/* #endif */
	}

	.wyb-table-loading-box {
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 500;
	}

	.wyb-table-header {
		position: sticky;
		top: 0;
		display: grid;
		grid-auto-flow: column;
		height: 65upx;
		width: max-content;
		z-index: 25;
	}

	.wyb-table-header-item {
		height: 65upx;
		flex: 1;
		display: flex;
		align-items: center;
		box-sizing: border-box;
		position: relative;
	}

	.wyb-table-header-icon {
		display: flex;
		flex-direction: column;
	}

	.wyb-table-content-line {
		display: grid;
		grid-auto-flow: column;
		width: max-content;
		position: relative;
	}

	.wyb-table-content-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		box-sizing: border-box;
	}

	.wyb-table-checkbox {
		border-radius: 3px;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
	}

	.icon-check {
		width: 100%;
		height: 100%;
		position: absolute;
		border-radius: 0;
		border-radius: 3px;
		font-weight: bold;
		box-sizing: border-box;
		transform: scale(1.1);
	}
</style>
